feat: implement WSL2 native mount support via path translation and boot-time bind mounting#5189
Open
Nachiket-Roy wants to merge 1 commit into
Open
Conversation
Nachiket-Roy
marked this pull request as draft
July 5, 2026 07:49
Nachiket-Roy
force-pushed
the
feature/wsl2-mount-semantics
branch
2 times, most recently
from
July 5, 2026 09:32
a9a283f to
fa396d9
Compare
…and boot-time bind mounting Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
Nachiket-Roy
force-pushed
the
feature/wsl2-mount-semantics
branch
from
July 5, 2026 09:35
fa396d9 to
aae7d80
Compare
Nachiket-Roy
marked this pull request as ready for review
July 5, 2026 09:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements Phase 2 of #5152 by bringing the WSL2 driver in line with Lima's standard mount behavior.
Previously, WSL2 relied solely on its native automounts (
C:\- >/mnt/c) and ignored Lima'smountsconfiguration (mountPoint,writable, and per-mountlocation). As a result, templates behaved differently on WSL2 compared to other drivers (QEMU/VZ), with no support for custom mount points or read-only mounts.Changes
TranslateWindowsToWSLPath) for default mount point resolution.locationandwritablemetadata into the guest.writable: falsevia read-only bind mounts,/etc/wsl.confto enable automount metadata support./etc/wsl.confupdates,